package com.ruoyi.recycle.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.recycle.domain.SalesmanManagement;
import com.ruoyi.recycle.dto.StatisticsDto;
import com.ruoyi.recycle.dto.TotalShopData;
import com.ruoyi.recycle.dto.TotalShopList;
import com.ruoyi.recycle.vo.MyBill;
import com.ruoyi.recycle.vo.OneShopStatisticsVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 业务员管理Mapper接口
 *
 * @author Wubk
 * @date 2022-05-21
 */
public interface SalesmanManagementMapper extends BaseMapper<SalesmanManagement> {
    /**
     * 查询业务员管理
     *
     * @param id 业务员管理主键
     * @return 业务员管理
     */
    public SalesmanManagement selectSalesmanManagementById(Long id);

    /**
     * 查询业务员管理列表
     *
     * @param salesmanManagement 业务员管理
     * @return 业务员管理集合
     */
    public List<SalesmanManagement> selectSalesmanManagementList(SalesmanManagement salesmanManagement);

    /**
     * 新增业务员管理
     *
     * @param salesmanManagement 业务员管理
     * @return 结果
     */
    public int insertSalesmanManagement(SalesmanManagement salesmanManagement);

    /**
     * 修改业务员管理
     *
     * @param salesmanManagement 业务员管理
     * @return 结果
     */
    public int updateSalesmanManagement(SalesmanManagement salesmanManagement);

    /**
     * 删除业务员管理
     *
     * @param id 业务员管理主键
     * @return 结果
     */
    public int deleteSalesmanManagementById(Long id);

    /**
     * 批量删除业务员管理
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSalesmanManagementByIds(Long[] ids);

    TotalShopData selectTotalShopData(@Param("salesmanId") Long salesmanId);

    List<TotalShopList> selectTotalShopList(@Param("salesmanId")Long salesmanId);

    List<TotalShopList> selectTotalShopListOrderByToDayNewClient(@Param("salesmanId")Long salesmanId);

    List<TotalShopList> selectTotalShopListOrderByMonthNewClient(@Param("salesmanId")Long salesmanId);

    List<TotalShopList> selectTotalShopListOrderByMonthOrder(@Param("salesmanId")Long salesmanId);

    List<TotalShopList> selectTotalShopListByShopType(@Param("salesmanId")Long salesmanId, @Param("shopType")String shopType);

    List<TotalShopList> selectTotalShopListBySignTime(@Param("salesmanId")Long salesmanId, @Param("signTime")String signTime);

    OneShopStatisticsVo oneShopData(@Param("shopId")Long shopId);

    Long selectTotalPersonalInformation(@Param("salesmanId")Long salesmanId);

    MyBill myBill(@Param("salesmanId")Long salesmanId);

    List<StatisticsDto> newClientSum(@Param("shopId")Long shopId);

    List<StatisticsDto> orderSum(@Param("shopId")Long shopId);

    List<StatisticsDto> shopIncome(@Param("shopId")Long shopId);

    List<StatisticsDto> salesmanIncome(@Param("shopId")Long shopId);

    List<StatisticsDto> newClientSumDay(@Param("shopId")Long shopId, @Param("signTime")String signTime);

    List<StatisticsDto> orderSumDay(@Param("shopId")Long shopId, @Param("signTime")String signTime);

    List<StatisticsDto> shopIncomeDay(@Param("shopId")Long shopId, @Param("signTime")String signTime);

    List<StatisticsDto> salesmanIncomeDay(@Param("shopId")Long shopId, @Param("signTime")String signTime);

    TotalShopData selectTotalClientData(@Param("salesmanId")Long salesmanId);

    List<TotalShopList> selectTotalClientList(@Param("salesmanId")Long salesmanId,@Param("type") Integer type,@Param("signTime") String signTime);

    OneShopStatisticsVo oneClientData(@Param("clientId")Long clientId);

    List<StatisticsDto> clientNewClientSumDay(@Param("clientId")Long clientId, @Param("signTime")String signTime);

    List<StatisticsDto> clientOrderSumDay(@Param("clientId")Long clientId, @Param("signTime")String signTime);

    List<StatisticsDto> clientOrderIntegralSumDay(@Param("clientId")Long clientId, @Param("signTime")String signTime);

    List<StatisticsDto> clientSalesmanIncomeDay(@Param("clientId")Long clientId, @Param("signTime")String signTime);

    List<StatisticsDto> clientNewClientSum(@Param("clientId")Long clientId);

    List<StatisticsDto> clientOrderSum(@Param("clientId")Long clientId);

    List<StatisticsDto> clientShopIncome(@Param("clientId")Long clientId);

    List<StatisticsDto> clientSalesmanIncome(@Param("clientId")Long clientId);

}
